<div class="modal-header">
  <div class="modal-title">{{(record.id ? 'edit' : 'add') | translate}}-{{'user'|translate}}</div>
</div>
<form (ngSubmit)="save()" nz-form>
  <nz-form-item>
    <nz-form-label nzMd=4 nzFor="name" nzRequired>{{'name'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <input nz-input autocomplete="off" [(ngModel)]="record.name" name="name" placeholder="{{'enterName'|translate}}" id="aname">
    </nz-form-control>

    <nz-form-label nzMd=4 nzFor="recordname" nzRequired>{{'account'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <input nz-input autocomplete="off" [readonly]="record.id" [(ngModel)]="record.username" name="recordname" placeholder="{{'enter'|translate}}{{'account'|translate|lowercase}}" id="recordname">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
      <nz-form-label nzMd=4 nzFor="brand" nzRequired>{{'brand'|translate}}</nz-form-label>
      <nz-form-control nzMd="8">
          <nz-select nzMode="multiple" [(ngModel)]="listOfSelectedValue" name="brand">
            <nz-option *ngFor="let option of brands" [nzLabel]="option.text" [nzValue]="option.value"></nz-option>
          </nz-select>
      </nz-form-control>
      
      <nz-form-label nzMd=4 nzFor="currency" nzRequired>{{'currency'|translate}}</nz-form-label>
      <nz-form-control nzMd="8">
          <nz-select [(ngModel)]="record.currency" name="currency">
            <nz-option *ngFor="let option of currencys" [nzLabel]="option.text" [nzValue]="option.value"></nz-option>
          </nz-select>
      </nz-form-control>
  </nz-form-item>


  <nz-form-item>
      <nz-form-label nzMd=4 nzFor="siteCode" nzRequired>{{'siteCode'|translate}}</nz-form-label>
      <nz-form-control nzMd="8">
          <nz-select [(ngModel)]="record.siteCode" name="siteCode">
            <nz-option *ngFor="let option of sitecodes" [nzLabel]="option.text" [nzValue]="option.value"></nz-option>
          </nz-select>
      </nz-form-control>

      <nz-form-label nzMd=4 nzFor="zname">{{'zname'|translate}}</nz-form-label>
      <nz-form-control nzMd="8">
        <input nz-input autocomplete="off" [(ngModel)]="record.zname" name="zname" placeholder="{{'enter'|translate}}{{'zname'|translate|lowercase}}" id="linkman">
      </nz-form-control>
  </nz-form-item>

  <nz-form-item>
      <nz-form-label nzMd=4 nzFor="label" nzRequired>标签</nz-form-label>
      <nz-form-control nzMd="8">
        <nz-select [(ngModel)]="record.label" name="label">
          <nz-option *ngFor="let option of labels" [nzLabel]="option.text" [nzValue]="option.value"></nz-option>
        </nz-select>
      </nz-form-control>

      <nz-form-label nzMd=4 nzFor="linkman">{{'contact'|translate}}</nz-form-label>
      <nz-form-control nzMd="8">
        <input nz-input autocomplete="off" [(ngModel)]="record.linkMan" name="linkman" placeholder="{{'enter'|translate}}{{'contact'|translate|lowercase}}" id="linkman">
      </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzMd=4 nzFor="tel">{{'tel'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <input nz-input autocomplete="off" [(ngModel)]="record.tel" name="tel" placeholder="{{'enter'|translate}}{{'tel'|translate|lowercase}}" id="tel">
    </nz-form-control>

    <nz-form-label nzMd=4 nzFor="email">{{'email'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <input nz-input autocomplete="off" [(ngModel)]="record.email" name="email" placeholder="{{'enter'|translate}}{{'email'|translate|lowercase}}" id="email">
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzMd=4 nzFor="address">{{'address'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <textarea nz-input [(ngModel)]="record.address" name="address" maxlength="120" id="address"></textarea>
    </nz-form-control>

    <nz-form-label nzMd=4 nzFor="remark">{{'remark'|translate}}</nz-form-label>
    <nz-form-control nzMd="8">
      <textarea nz-input [(ngModel)]="record.remark" name="remark" id="remark"></textarea>
    </nz-form-control>

  </nz-form-item>

  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">{{'close' | translate}}</button>
    <button nz-button [nzLoading]="loading" [nzType]="'primary'">{{'save' | translate}}</button>
  </div>
</form>




